# user/urls.py
from django.urls import path
from . import views

urlpatterns = [
    path('login/', views.LoginView.as_view(), name='login'),
    path('register/', views.RegisterView.as_view(), name='register'),
    path('refresh/', views.RefreshTokenView.as_view(), name='refresh-token'),
    path('user/', views.UserInfoView.as_view(), name='user-info'),  # 修改为 /user/
    path('user/update/', views.UserUpdateView.as_view(), name='user-update'),  # 修改为 /user/update/
    path('users/', views.UserListView.as_view(), name='user-list'),  # 保持 /users/
    path('users/<int:user_id>/', views.UserDeleteView.as_view(), name='user-delete'),  # 保持 /users/{id}/
    path('logout/', views.LogoutView.as_view(), name='logout'),
]
